<template>
  <div class="headerBanner">
    <Carousel autoplay v-model="value2" :autoplay-speed="4000" :loop='true' :radius-dot='true'>
      <CarouselItem v-for="(bList,index) in bannerList" :key="index">
        <div class="demo-carousel">
          <a :href="bList.url"><img :src="bList.path" alt=""></a>
        </div>
      </CarouselItem>
    </Carousel>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        value2: 0,
        bannerListData: '',
        bannerList: [
          {
            path: "",
            url: 'javascript:void(0)'
          }
        ]
      }
    },
    activated() {},
    methods: {},
    watch: {
      '$parent.homeData'() {
        let that = this;
        that.bannerList = that.$parent.homeData.bannerList;
      }
    }
  }
</script>

<style>
.headerBanner {
  padding-top: 62px;
  position: relative;
  z-index: 3;
}
  .demo-carousel a img{
    width: auto;
    height:25.9vw;
  }
</style>
